class Userinfo 
{
	String username
	String realname;
	String password;
	String sex;
	Date birth;
	Date regtime = new Date();
	String telephone;
	String mbphone;
	String email;
	String address;
	String postcode;
	Orginfo orginfo;
	Roleinfo roleinfo;
	
	String toString() { username }
	
	static constraints = 
	{
		username(maxSize:50, blank:false, unique:true)
		realname(maxSize:50, blank:false)
		password(maxSize:30, blank:false)
		sex(maxSize:4, blank:false, inList:["男", "女"])
		birth(nullable:true)
		regtime(nullable:true)
		telephone(maxSize:30, nullable:true)
		mbphone(maxSize:15, nullable:true)
		email(maxSize:50, email:true, blank:false)
		address(maxSize:100,nullable:true)
		postcode(maxSize:10,nullable:true)
	}
	

}